package com.share.wechat.core.repository.inter;

import com.share.wechat.core.entity.Category;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 分类操作的仓库类
 * Created by er on 2017/11/17.
 */
@Repository
public interface CategoryRepository extends CrudRepository<Category, String> {

    //TODO
    @Query("")
    void updateOne(Category category);


    List<Category> findByPIdAndLevel(int pId, int level);


    List<Category> findByLevel(int level);
}
